import fetch from 'common/src/utils/fetch';

/**
 * 查询学生选课名单
 */
function findElectCourseList(data) {
    return fetch({
        url: '/api/electionservice/reportManagement/findElectCourseList',
        method: 'post',
        data: data
    });
}

/**
 * 新增未选课原因
 */
function addNoSelectReason(data) {
    return fetch({
        url: '/api/electionservice/reportManagement/addNoSelectReason',
        method: 'post',
        data: data
    });
}

/**
 * 代选课
 */
function otherSelectCourse(data) {
    return fetch({
        url: '/api/electionservice/reportManagement/otherSelectCourse',
        method: 'post',
        data: data
    });
}
/**
 * 查找未选课原因
 */
function findNoSelectReason(calendarId) {
    return fetch({
        url:
            '/api/electionservice/reportManagement/findNoSelectReason?calendarId=' +
            calendarId,
        method: 'post'
    });
}

/**
 *
 * 导出未选课学生名单
 */
function exportStudents(data) {
    return fetch({
        url: '/api/electionservice/reportManagement/export',
        method: 'post',
        data: data
    });
}

/**
 *
 * 查询是否导出完成未选课学生名单
 */
function exportStatus(key) {
    return fetch({
        url: '/api/electionservice/reportManagement/result/'+key,
        method: 'get'
    });
}
export default {
    findElectCourseList: findElectCourseList,
    addNoSelectReason: addNoSelectReason,
    otherSelectCourse: otherSelectCourse,
    findNoSelectReason: findNoSelectReason,
    exportStudents: exportStudents,
    exportStatus:exportStatus
};
